package com.anlgin.anl_tea.mapper;

import com.anlgin.anl_tea.entities.Attribute;
import org.springframework.stereotype.Repository;
import com.anlgin.anl_tea.entities.Commodity;
import com.anlgin.anl_tea.entities.CommodityType;

import java.util.List;
@Repository
public interface CommodityMapper {

    //获取所有商品
    public List<Commodity> getCommodities();
    //获得所有属性
    public List<Attribute> getAttributes();
    //添加商品
    public void insertCommodity(Commodity commodity);
    //获取所有商品类型
    public List<CommodityType> getAllCommodityTypes();
    //添加商品类型
    public void addCommodityType(CommodityType commodityType);
    //删除商品类型
    public void deleteCommodityType(CommodityType commodityType);
    //更新商品类型
    public void updateCommodityType(CommodityType commodityType);
    //根据属性id获取商品属性
    public List<Attribute> getAttributeById(Integer id);
}
